package znbkTestPaperNtxl.savePaper;

import java.util.List;

/**
 * Created by Administrator on 2018\2\28 0028.
 */

public class SaveTrainingDifficultProblemsEntity {

    /**
     * StuID : zxstu8
     * ItemFrom : 4
     * StuAnswer : [{"ChildIndex":1,"SubChildList":[{"StuAssess":"","SubChildIndex":1,"StuAnswer":"A","UploadPath":""}]},{"ChildIndex":2,"SubChildList":[{"StuAssess":"","SubChildIndex":1,"StuAnswer":"B","UploadPath":""}]},{"ChildIndex":3,"SubChildList":[{"StuAssess":"","SubChildIndex":1,"StuAnswer":"","UploadPath":""}]},{"ChildIndex":4,"SubChildList":[{"StuAssess":"","SubChildIndex":1,"StuAnswer":"","UploadPath":""}]},{"ChildIndex":5,"SubChildList":[{"StuAssess":"","SubChildIndex":1,"StuAnswer":"","UploadPath":""}]}]
     * QuesID : CCAE07065DHD10z01M7
     * CorrectRate : 0.0
     * QuesBrief : <P>Police Officer Tidwell left the station just after 8 a.m. on Sunday June 4. He had spent a
     <P>boring night ondutyand was looking forward to his day of rest. By habit he took a short-cut down the path behind Dugby Hall road and after a minute or two he saw a man climbing down a drainpipe (<B>雨水管</B>) from an open bedroom window of Number 29. In silence, Tidwell crept into the garden. The man reached the ground and was dusting himself down when he felt his arm caught.
     <P>"It's 8:15 on a Sunday morning," said the officer, "and this sort of thing seems an unlikely adventure at such a time. Would you mind explaining?"
     <P>The man was obviously scared but tried to keep calm. He said, "I know what you are thinking, officer, but it isn't true. This is a funny mistake."
     <P>"It's part of my job to take an interest in unusual events. I think you've just left this house
     <P>in a manner other than the customary one. That may be quite innocent, but I'd like to make sure." Tidwell took out his notebook and a pen. "Name, address and occupation and then, please, tell me your story ... "
     <P>"Charlie Crane, lorry driver, from Nottingham, 51 Breton Street. My story ... "
     <P>"Yes. What were you doing like a fly on that wall, Mr. Crane?"
     <P>"Well, I had a breakdown yesterday and had to stay the night here. Bed and breakfast. Theland-lady's name is Mrs. Fern. She gave me breakfast at seven, and I was out of here in the right way and down at the lorry by half past seven. Only when I felt around for a cigarette did I realize I'd left $80 in my envelope under the pillow here at number 29. I always put it under my pillow at night. It's a habit I've got into. I even do it at home ... "
     <P>"I see. Why didn't you miss it when you went to pay Mrs ... What's her name?"
     <P>"I'd paid her last night. You've got to pay when you take the room, see? So I came rushing back, but it's Sunday, and she'd gone back to bed, and could I wake her? I rang the bell and banged on the front door for ten minutes before I came round here to the back and spotted my bedroom window still open. Up I went, then, up this pipe. It's a trick I learned in the army. She didn't make the bed, and money was still there. You know the rest, I hope you believe it because ... "
     <P>"Mr. Crane, whatever are you doing here? I thought you'd gone an hour ago." It was Mrs. Fern, speaking from the kitchen at the corner of the house.</P>
     * AnswerState : 1
     * TypeID : D
     * Duration : 2
     * AnswerItemCount : 2
     * TypeName : 阅读理解
     * TotalItemCount : 5
     * SubjectID : C
     * StuName : 朱小玲
     * StageNo : C
     */

    public SaveTrainingDifficultProblemsEntity(
             String stuID,
             int itemFrom,
             String quesID,
             double correctRate,
             String quesBrief,
             int answerState,
             String typeID,
             int duration,
             int answerItemCount,
             String typeName,
             int totalItemCount,
             String subjectID,
             String stuName,
             String stageNo,
             List<StuAnswerBean> stuAnswer){

             StuID = stuID;
             ItemFrom = itemFrom;
             QuesID = quesID;
             CorrectRate = correctRate;
             QuesBrief = quesBrief;
             AnswerState = answerState;
             TypeID = typeID;
             Duration = duration;
             AnswerItemCount = answerItemCount;
             TypeName = typeName;
             TotalItemCount = totalItemCount;
             SubjectID = subjectID;
             StuName = stuName;
             StageNo = stageNo;
             StuAnswer = stuAnswer;

    }

    private String StuID;
    private int ItemFrom;
    private String QuesID;
    private double CorrectRate;
    private String QuesBrief;
    private int AnswerState;
    private String TypeID;
    private int Duration;
    private int AnswerItemCount;
    private String TypeName;
    private int TotalItemCount;
    private String SubjectID;
    private String StuName;
    private String StageNo;
    private List<StuAnswerBean> StuAnswer;

    public String getStuID() {
        return StuID;
    }

    public void setStuID(String StuID) {
        this.StuID = StuID;
    }

    public int getItemFrom() {
        return ItemFrom;
    }

    public void setItemFrom(int ItemFrom) {
        this.ItemFrom = ItemFrom;
    }

    public String getQuesID() {
        return QuesID;
    }

    public void setQuesID(String QuesID) {
        this.QuesID = QuesID;
    }

    public double getCorrectRate() {
        return CorrectRate;
    }

    public void setCorrectRate(double CorrectRate) {
        this.CorrectRate = CorrectRate;
    }

    public String getQuesBrief() {
        return QuesBrief;
    }

    public void setQuesBrief(String QuesBrief) {
        this.QuesBrief = QuesBrief;
    }

    public int getAnswerState() {
        return AnswerState;
    }

    public void setAnswerState(int AnswerState) {
        this.AnswerState = AnswerState;
    }

    public String getTypeID() {
        return TypeID;
    }

    public void setTypeID(String TypeID) {
        this.TypeID = TypeID;
    }

    public int getDuration() {
        return Duration;
    }

    public void setDuration(int Duration) {
        this.Duration = Duration;
    }

    public int getAnswerItemCount() {
        return AnswerItemCount;
    }

    public void setAnswerItemCount(int AnswerItemCount) {
        this.AnswerItemCount = AnswerItemCount;
    }

    public String getTypeName() {
        return TypeName;
    }

    public void setTypeName(String TypeName) {
        this.TypeName = TypeName;
    }

    public int getTotalItemCount() {
        return TotalItemCount;
    }

    public void setTotalItemCount(int TotalItemCount) {
        this.TotalItemCount = TotalItemCount;
    }

    public String getSubjectID() {
        return SubjectID;
    }

    public void setSubjectID(String SubjectID) {
        this.SubjectID = SubjectID;
    }

    public String getStuName() {
        return StuName;
    }

    public void setStuName(String StuName) {
        this.StuName = StuName;
    }

    public String getStageNo() {
        return StageNo;
    }

    public void setStageNo(String StageNo) {
        this.StageNo = StageNo;
    }

    public List<StuAnswerBean> getStuAnswer() {
        return StuAnswer;
    }

    public void setStuAnswer(List<StuAnswerBean> StuAnswer) {
        this.StuAnswer = StuAnswer;
    }

    public static class StuAnswerBean {

        public StuAnswerBean(  int childIndex,List<SubChildListBean> subChildList){
            ChildIndex = childIndex;
            SubChildList = subChildList;
        }

        /**
         * ChildIndex : 1
         * SubChildList : [{"StuAssess":"","SubChildIndex":1,"StuAnswer":"A","UploadPath":""}]
         */

        private int ChildIndex;
        private List<SubChildListBean> SubChildList;

        public int getChildIndex() {
            return ChildIndex;
        }

        public void setChildIndex(int ChildIndex) {
            this.ChildIndex = ChildIndex;
        }

        public List<SubChildListBean> getSubChildList() {
            return SubChildList;
        }

        public void setSubChildList(List<SubChildListBean> SubChildList) {
            this.SubChildList = SubChildList;
        }

        public static class SubChildListBean {

            public SubChildListBean(
                     String stuAssess,
                     int subChildIndex,
                     String stuAnswer,
                     String uploadPath){

                StuAssess = stuAssess;
                SubChildIndex = subChildIndex;
                StuAnswer = stuAnswer;
                UploadPath = uploadPath;

            }

            /**
             * StuAssess :
             * SubChildIndex : 1
             * StuAnswer : A
             * UploadPath :
             */

            private String StuAssess;
            private int SubChildIndex;
            private String StuAnswer;
            private String UploadPath;

            public String getStuAssess() {
                return StuAssess;
            }

            public void setStuAssess(String StuAssess) {
                this.StuAssess = StuAssess;
            }

            public int getSubChildIndex() {
                return SubChildIndex;
            }

            public void setSubChildIndex(int SubChildIndex) {
                this.SubChildIndex = SubChildIndex;
            }

            public String getStuAnswer() {
                return StuAnswer;
            }

            public void setStuAnswer(String StuAnswer) {
                this.StuAnswer = StuAnswer;
            }

            public String getUploadPath() {
                return UploadPath;
            }

            public void setUploadPath(String UploadPath) {
                this.UploadPath = UploadPath;
            }
        }
    }
}


//    /*
//      * 滑动保存  Position = lastBigViewPage
//      * 返回保存  Position = currentBigViewPage
//      * */
//    private String[] smallStuAnswer;
//    private String[] smallAnswer;
//    private void saveAndSubmit(boolean isFromExit,boolean isAssess){
//
//        int ChildAnswerType = mEntityNtxl.getTKQue().getChildList().get(0).getChildAnswerType();
//        int ChildListSize = mEntityNtxl.getTKQue().getChildList().size();
//        int TotalItemCount = -1;
//
//        if(mEntityNtxl.getTKQue().getTypeName().equals("匹配题")){
//            TotalItemCount = 1;
//        }else {
//            TotalItemCount = mEntityNtxl.getTKQue().getTotalItemCount();//试卷总题数
//        }
//
//
//        if(isFromExit& ZnbkPaperNtxlInfor.AnswerState==3){
//            if(ChildAnswerType==2) {
//
//                if(TotalItemCount>ChildListSize){
//                    String StuAssess = mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).getSubChildStuAssess();
//                    if(StuAssess.equals("")) {
//                        mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).setSubChildStuAssess("系统默认优秀");
//                    }
//                }else if(TotalItemCount==ChildListSize){
//                    for(int i=0;i<ChildListSize;i++){
//                        String StuAssess = mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess();
//                        if( StuAssess.equals("")) {
//                            mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).setSubChildStuAssess("系统默认优秀");
//                        }
//                    }
//                }
//
//            }else if(ChildAnswerType==4){
//
//                for(int i=0;i<ChildListSize;i++){
//                    String StuAssess = mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess();
//                    if( StuAssess.equals("")) {
//                        mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).setSubChildStuAssess("系统默认优秀");
//                    }
//                }
//
//            }
//        }
//
//        String QuesBrief = mEntityNtxl.getTKQue().getQuesBrief();
//
//        String TypeID = mEntityNtxl.getTKQue().getTypeNo();
//
//        int Duration = paperTimeLong;//暂时瞎传
//
//        String QuesID = mEntityNtxl.getTKQue().getQuesID();
//
//        if(mEntityNtxl.getTKQue().getTypeName().equals("改错题")||
//                mEntityNtxl.getTKQue().getTypeName().equals("词汇填空")||
//                mEntityNtxl.getTKQue().getTypeName().equals("阅读填空")||
//                mEntityNtxl.getTKQue().getTypeName().equals("听力填空")) {
//            ZnbkPaperNtxlInfor.StuAnswer = mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).getSubChildStuAnswer();
//            ZnbkPaperNtxlInfor.Answer = mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).getSubChildAnswer();
//            ZnbkPaperNtxlInfor.StuAssess = mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).getSubChildStuAssess();
//            smallStuAnswer = new String[ZnbkPaperNtxlInfor.TotalItemCount];
//            smallAnswer = new String[ZnbkPaperNtxlInfor.TotalItemCount];
//        }
//
//        ZnbkPaperNtxlInfor.AnswerItemCount = 0;
//        ZnbkPaperNtxlInfor.AnswerItemCountTrue = 0;
//        for(int i=0;i<ZnbkPaperNtxlInfor.TotalItemCount;i++) {
//
//            if(mEntityNtxl.getTKQue().getTypeName().equals("改错题")||
//                    mEntityNtxl.getTKQue().getTypeName().equals("词汇填空")||
//                    mEntityNtxl.getTKQue().getTypeName().equals("阅读填空")||
//                    mEntityNtxl.getTKQue().getTypeName().equals("听力填空")){
//                if(!ZnbkPaperNtxlInfor.StuAnswer.equals("")) {
//                    smallStuAnswer[i] = Control.returnArray(ZnbkPaperNtxlInfor.StuAnswer, "$、", 2)[i];
//                }else{
//                    smallStuAnswer[i] = "";
//                }
//
//                smallAnswer[i] = Control.returnArray(ZnbkPaperNtxlInfor.Answer,"$、",2)[i];
//
//
//                if (!smallStuAnswer[i].equals("") || !ZnbkPaperNtxlInfor.StuAssess.equals("")) {
//                    ZnbkPaperNtxlInfor.AnswerItemCount++;
//                }
//
//                if (ZnbkPaperNtxlInfor.StuAssess.equals("优秀") ||
//                        ZnbkPaperNtxlInfor.StuAssess.equals("良好") ||
//                        ZnbkPaperNtxlInfor.StuAssess.equals("合格") ||
//                        smallStuAnswer[i].equals(smallAnswer[i])) {
//                    ZnbkPaperNtxlInfor.AnswerItemCountTrue++;
//                }
//
//            }else {
//
//                if (!mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess().equals("") ||
//                        !mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAnswer().equals("")) {
//                    ZnbkPaperNtxlInfor.AnswerItemCount++;
//                }
//
//                if (mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess().equals("优秀") ||
//                        mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess().equals("良好") ||
//                        mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess().equals("合格") ||
//                        mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAnswer().equals(
//                                mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildAnswer())) {
//                    ZnbkPaperNtxlInfor.AnswerItemCountTrue++;
//                }
//            }
//        }
//        ZnbkPaperNtxlInfor.CorrectRate = Control.getCorrectRate((float)ZnbkPaperNtxlInfor.AnswerItemCountTrue,(float)ZnbkPaperNtxlInfor.TotalItemCount);
//
//        List<SaveTrainingDifficultProblemsEntity.StuAnswerBean> jsonAnswerList
//                = new ArrayList<SaveTrainingDifficultProblemsEntity.StuAnswerBean>();
//
//        if(mEntityNtxl.getTKQue().getTypeName().equals("改错题")||
//                mEntityNtxl.getTKQue().getTypeName().equals("词汇填空")||
//                mEntityNtxl.getTKQue().getTypeName().equals("阅读填空")||
//                mEntityNtxl.getTKQue().getTypeName().equals("听力填空")){
//
//            List<SaveTrainingDifficultProblemsEntity.StuAnswerBean.SubChildListBean> jsonSubChildList
//                    = new ArrayList<SaveTrainingDifficultProblemsEntity.StuAnswerBean.SubChildListBean>();
//
//            ZnbkPaperNtxlInfor.StuAssess = mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).getSubChildStuAssess();
//            ZnbkPaperNtxlInfor.StuAnswer = mEntityNtxl.getTKQue().getChildList().get(0).getSubChildList().get(0).getSubChildStuAnswer();
//            jsonSubChildList.add(SaveTrainingDifficultProblemsModel.getSubChildListBean(
//                    ZnbkPaperNtxlInfor.StuAssess,1,ZnbkPaperNtxlInfor.StuAnswer,""
//            ));
//            jsonAnswerList.add(SaveTrainingDifficultProblemsModel.getStuAnswerBean(
//                    1,jsonSubChildList));
//            ZnbkPaperNtxlInfor.ListStuAnswer = jsonAnswerList;
//
//        }else {
//
//            for(int i=0;i<ZnbkPaperNtxlInfor.TotalItemCount;i++){
//
//                List<SaveTrainingDifficultProblemsEntity.StuAnswerBean.SubChildListBean> jsonSubChildList
//                        = new ArrayList<SaveTrainingDifficultProblemsEntity.StuAnswerBean.SubChildListBean>();
//
//                ZnbkPaperNtxlInfor.StuAssess = mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAssess();
//                ZnbkPaperNtxlInfor.StuAnswer = mEntityNtxl.getTKQue().getChildList().get(i).getSubChildList().get(0).getSubChildStuAnswer();
//                jsonSubChildList.add(SaveTrainingDifficultProblemsModel.getSubChildListBean(
//                        ZnbkPaperNtxlInfor.StuAssess,1,ZnbkPaperNtxlInfor.StuAnswer,""
//                ));
//                jsonAnswerList.add(SaveTrainingDifficultProblemsModel.getStuAnswerBean(
//                        i+1,jsonSubChildList));
//                ZnbkPaperNtxlInfor.ListStuAnswer = jsonAnswerList;
//            }
//
//        }
//
//        saveSingleQues(isFromExit,isAssess);//答案不同或自评不同就保存作答结果
//
//    }